package com.sunchen.asc.service.item.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@ApiModel(value="事项对象",description="事项item")
public class ItemVo implements Serializable {

    private Long id;

    @ApiModelProperty(value="事项编码",name="code")
    @NotEmpty(message = "事项编码不能为空")
    private String code;

    @ApiModelProperty(value="事项名",name="name")
    @NotEmpty(message = "事项名不能为空")
    private String name;

    @ApiModelProperty(value="父级id",name="parentId")
    @NotNull(message = "父级id不能为空，无父级为0")
    private Long parentId;

    @ApiModelProperty(value = "0无 1有",hidden = true)
    private int hasChild;

    @ApiModelProperty(value="主题id",name="titleId")
    @NotNull(message = "主题id不能为空")
    private Long titleId;

    @ApiModelProperty(value="主题类型（1：个人，2：法人）",name="titleType")
    @NotNull(message = "不能为空")
    private int titleType;

    @ApiModelProperty(value="受理主体",name="acceptDeptId")
    @NotNull(message = "受理主体不能为空")
    private Long acceptDeptId;

    @ApiModelProperty(value="受理主体",name="acceptDeptName")
    @NotEmpty(message = "受理主体不能为空")
    private String acceptDeptName;

    @ApiModelProperty(value="是否必须来大厅办理（0：否1：是）",name="toFace")
    @NotNull(message = "不能为空")
    private int toFace;

    @ApiModelProperty(value="是否收费（0：否1：是）",name="chargeFlag")
    @NotNull(message = "不能为空")
    private int chargeFlag;

    @ApiModelProperty(value="服务对象",name="serviceObject")
    @NotEmpty(message = "不能为空")
    private String serviceObject;

    @ApiModelProperty(value="生命周期",name="lifeCycle")
    @NotEmpty(message = "不能为空")
    private String lifeCycle;

    @ApiModelProperty(value="事项类型",name="itemType")
    @NotEmpty(message = "不能为空")
    private String itemType;

    @ApiModelProperty(value="办理地点",name="addressId")
    @NotNull(message = "不能为空")
    private Long addressId;

    @ApiModelProperty(value = "状态",hidden = true)
    private int status;

    @ApiModelProperty(value="能否网上办理(0否，1是)",name="onlineFlag")
    @NotNull(message = "不能为空")
    private int onlineFlag;

    @ApiModelProperty(value="实施编码（hasChild为1时填写）",name="workCode")
    private String workCode;
    @ApiModelProperty(value="行使层级（hasChild为1时填写）",name="level")
    private String level;
    @ApiModelProperty(value="设定依据（hasChild为1时填写）",name="basis")
    private String basis;
    @ApiModelProperty(value="权力来源（hasChild为1时填写）",name="power")
    private String power;
    //子事项数量
    private int childCount;
    //事项标记
    private int itemMark;

    public ItemVo() {
    }

    public ItemVo(Long id, String code, String name,Long parentId, int hasChild, Long titleId, Long acceptDeptId, String acceptDeptName, int toFace, int chargeFlag, String serviceObject, String lifeCycle, String itemType, Long addressId, int status, String workCode, String level, String basis, String power, int childCount, int onlineFlag,int titleType,int itemMark) {
        this.id = id;
        this.code = code;
        this.name = name;
        this.parentId = parentId;
        this.hasChild = hasChild;
        this.titleId = titleId;
        this.acceptDeptId = acceptDeptId;
        this.acceptDeptName = acceptDeptName;
        this.toFace = toFace;
        this.chargeFlag = chargeFlag;
        this.serviceObject = serviceObject;
        this.lifeCycle = lifeCycle;
        this.itemType = itemType;
        this.addressId = addressId;
        this.status = status;
        this.workCode = workCode;
        this.level = level;
        this.basis = basis;
        this.power = power;
        this.childCount = childCount;
        this.onlineFlag = onlineFlag;
        this.titleType = titleType;
        this.itemMark = itemMark;
    }
}
